package com.java.advance.clazz.loader;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by yangminghua on 2019/3/4.
 */
public class TestDemo {

    private static TestDemo t1 = new TestDemo();

    {
        System.out.println("A");
    }

    static {
        System.out.println("B");
    }


    public static void main(String[] args) {
//        TestDemo t2 = new TestDemo();

        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.add(Calendar.HOUR, -2);
        Date closeTime = calendar.getTime();
        System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(closeTime));
    }
}
